package com.gopay.scheduler.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.cust.CustInfoExtendItem;
import com.gopay.scheduler.dao.CustExtendItemDao;

/** 
 * @ClassName: CustExtendItemDaoImpl 
 * @Description: 查询基金公司的机构代码实现类
 * @author PanShiChao 
 * @date 2016年7月18日 上午10:04:21  
 */ 
@Repository("custExtendItemDao")
public class CustExtendItemDaoImpl extends BaseDAOImpl<CustInfoExtendItem, Long> implements CustExtendItemDao {

    @Override
    public List<CustInfoExtendItem> findFundCompanyCodeByItemKey(Map<String, Object> param) {
        // TODO Auto-generated method stub
        StringBuffer hql = new StringBuffer("from CustInfoExtendItem where itemKey = :itemKey");
        List<CustInfoExtendItem> list = findByHql(hql.toString(),param);
        return list;
    }

    @Override
    public CustInfoExtendItem findFundCustIdByItemValue(Map<String, Object> param) {
        // TODO Auto-generated method stub
        StringBuffer hql = new StringBuffer("from CustInfoExtendItem where itemValue = :itemValue");
        List<CustInfoExtendItem> list = findByHql(hql.toString(),param);
        return list.get(0);
    }

}
